{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from sklearn.model_selection import train_test_split\n",
    "import numpy as np\n",
    "from collections import Counter\n",
    "import tensorflow as tf\n",
    "\n",
    "import os\n",
    "import pickle\n",
    "import re\n",
    "from tensorflow.python.ops import math_ops"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据预处理为FeatureColumn\n",
    "原始数据文档\n",
    "* https://tianchi.aliyun.com/datalab/dataSet.html?dataId=408\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 处理样本骨架特征\n",
    "\n",
    "### Item Features\t\n",
    "\n",
    "205\tItem ID.\n",
    "\n",
    "206\tCategory ID to which the item belongs to.\n",
    "\n",
    "207\tShop ID to which item belongs to.\n",
    "\n",
    "210\tIntention node ID which the item belongs to.\n",
    "\n",
    "216\tBrand ID of the item.\n",
    "\n",
    "### Combination Features\t\n",
    "508\tThe combination of features with 109_14 and 206.\n",
    "\n",
    "509\tThe combination of features with 110_14 and 207.\n",
    "\n",
    "702\tThe combination of features with 127_14 and 216.\n",
    "\n",
    "853\tThe combination of features with 150_14 and 210.\n",
    "\n",
    "### Context Features\t\n",
    "301\tA categorical expression of position."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 训练样本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "current_index: 0\n",
      "current_index: 10000\n",
      "current_index: 20000\n",
      "current_index: 30000\n",
      "current_index: 40000\n",
      "current_index: 50000\n",
      "current_index: 60000\n",
      "current_index: 70000\n",
      "current_index: 80000\n",
      "current_index: 90000\n",
      "current_index: 100000\n",
      "current_index: 110000\n",
      "current_index: 120000\n",
      "current_index: 130000\n",
      "current_index: 140000\n",
      "current_index: 150000\n",
      "current_index: 160000\n",
      "current_index: 170000\n",
      "current_index: 180000\n",
      "current_index: 190000\n",
      "current_index: 200000\n",
      "current_index: 210000\n",
      "current_index: 220000\n",
      "current_index: 230000\n",
      "current_index: 240000\n",
      "current_index: 250000\n",
      "current_index: 260000\n",
      "current_index: 270000\n",
      "current_index: 280000\n",
      "current_index: 290000\n",
      "current_index: 300000\n",
      "current_index: 310000\n",
      "current_index: 320000\n",
      "current_index: 330000\n",
      "current_index: 340000\n",
      "current_index: 350000\n",
      "current_index: 360000\n",
      "current_index: 370000\n",
      "current_index: 380000\n",
      "current_index: 390000\n",
      "current_index: 400000\n",
      "current_index: 410000\n",
      "current_index: 420000\n",
      "current_index: 430000\n",
      "current_index: 440000\n",
      "current_index: 450000\n",
      "current_index: 460000\n",
      "current_index: 470000\n",
      "current_index: 480000\n",
      "current_index: 490000\n",
      "current_index: 500000\n",
      "current_index: 510000\n",
      "current_index: 520000\n",
      "current_index: 530000\n",
      "current_index: 540000\n",
      "current_index: 550000\n",
      "current_index: 560000\n",
      "current_index: 570000\n",
      "current_index: 580000\n",
      "current_index: 590000\n",
      "current_index: 600000\n",
      "current_index: 610000\n",
      "current_index: 620000\n",
      "current_index: 630000\n",
      "current_index: 640000\n",
      "current_index: 650000\n",
      "current_index: 660000\n",
      "current_index: 670000\n",
      "current_index: 680000\n",
      "current_index: 690000\n",
      "current_index: 700000\n",
      "current_index: 710000\n",
      "current_index: 720000\n",
      "current_index: 730000\n",
      "current_index: 740000\n",
      "current_index: 750000\n",
      "current_index: 760000\n",
      "current_index: 770000\n",
      "current_index: 780000\n",
      "current_index: 790000\n",
      "current_index: 800000\n",
      "current_index: 810000\n",
      "current_index: 820000\n",
      "current_index: 830000\n",
      "current_index: 840000\n",
      "current_index: 850000\n",
      "current_index: 860000\n",
      "current_index: 870000\n",
      "current_index: 880000\n",
      "current_index: 890000\n",
      "current_index: 900000\n",
      "current_index: 910000\n",
      "current_index: 920000\n",
      "current_index: 930000\n",
      "current_index: 940000\n",
      "current_index: 950000\n",
      "current_index: 960000\n",
      "current_index: 970000\n",
      "current_index: 980000\n",
      "current_index: 990000\n",
      "current_index: 1000000\n",
      "current_index: 1010000\n",
      "current_index: 1020000\n",
      "current_index: 1030000\n",
      "current_index: 1040000\n",
      "0\n"
     ]
    }
   ],
   "source": [
    "\n",
    "sample_feature_columns = ['sample_id', 'click', 'buy', 'md5', 'feature_num', 'feature_list']\n",
    "sample_table = pd.read_table('./ctr_cvr_data/sample_skeleton_train_sample_2_percent.csv', \n",
    "                             sep=',', header=None, names=sample_feature_columns, engine = 'python')\n",
    "#feature_field_list = ['205','206','207','210','216','508','509','702','853','301']\n",
    "feature_name_list = ['ItemID','CategoryID','ShopID','NodeID','BrandID','Com_CateID',\n",
    "                     'Com_ShopID','Com_BrandID','Com_NodeID','PID']\n",
    "field_id_name = {'205':'ItemID',\n",
    "                 '206':'CategoryID',\n",
    "                 '207':'ShopID',\n",
    "                 '210':'NodeID',\n",
    "                 '216':'BrandID',\n",
    "                 '508':'Com_CateID',\n",
    "                 '509':'Com_ShopID',\n",
    "                 '702':'Com_BrandID',\n",
    "                 '853':'Com_NodeID',\n",
    "                 '301':'PID'}\n",
    "entire_fea_dict = {}\n",
    "for k,v in field_id_name.items():\n",
    "    entire_fea_dict[v] = []\n",
    "for index, row in sample_table.iterrows():\n",
    "    feature_arr = row['feature_list'].split('\\001')\n",
    "    fea_dict = {}\n",
    "    for k,v in field_id_name.items():\n",
    "        fea_dict[k] = []\n",
    "    for fea_kv in feature_arr:\n",
    "        fea_field_id = fea_kv.split('\\002')[0]\n",
    "        fea_id_val = fea_kv.split('\\002')[1]\n",
    "        fea_id = fea_id_val.split('\\003')[0]\n",
    "        fea_val = fea_id_val.split('\\003')[1]\n",
    "        #print(fea_field_id,fea_id,fea_val)\n",
    "        fea_dict[fea_field_id].append(fea_id)\n",
    "    #print(fea_dict)\n",
    "    for k,v in fea_dict.items():\n",
    "        if len(v) == 0:\n",
    "            entire_fea_dict[field_id_name[k]].append('<PAD>')\n",
    "        else:\n",
    "            entire_fea_dict[field_id_name[k]].append('|'.join(v))\n",
    "    if index % 10000 == 0:\n",
    "       print(\"current_index:\",index)\n",
    "\n",
    "#print(entire_fea_dict)    \n",
    "\n",
    "entire_fea_table = pd.DataFrame(data=entire_fea_dict,columns=feature_name_list)\n",
    "\n",
    "#print(sample_table.columns)\n",
    "#print(entire_fea_table.columns)\n",
    "sample_table = sample_table.drop('feature_list',axis=1)\n",
    "\n",
    "sample_table = pd.concat([sample_table, entire_fea_table], axis=1, join_axes=[sample_table.index])\n",
    "\n",
    "sample_table.to_csv('./ctr_cvr_data/sampled_sample_skeleton_train_sample_feature_column.csv',index=False)\n",
    "print(0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 测试集样本"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 203,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "current_index: 0\n",
      "current_index: 10000\n",
      "current_index: 20000\n",
      "current_index: 30000\n",
      "current_index: 40000\n",
      "current_index: 50000\n",
      "current_index: 60000\n",
      "current_index: 70000\n",
      "current_index: 80000\n",
      "current_index: 90000\n",
      "current_index: 100000\n",
      "current_index: 110000\n",
      "current_index: 120000\n",
      "current_index: 130000\n",
      "current_index: 140000\n",
      "current_index: 150000\n",
      "current_index: 160000\n",
      "current_index: 170000\n",
      "current_index: 180000\n",
      "current_index: 190000\n",
      "current_index: 200000\n",
      "current_index: 210000\n",
      "current_index: 220000\n",
      "current_index: 230000\n",
      "current_index: 240000\n",
      "current_index: 250000\n",
      "current_index: 260000\n",
      "current_index: 270000\n",
      "current_index: 280000\n",
      "current_index: 290000\n",
      "current_index: 300000\n",
      "current_index: 310000\n",
      "current_index: 320000\n",
      "current_index: 330000\n",
      "current_index: 340000\n",
      "current_index: 350000\n",
      "current_index: 360000\n",
      "current_index: 370000\n",
      "current_index: 380000\n",
      "current_index: 390000\n",
      "current_index: 400000\n",
      "current_index: 410000\n",
      "current_index: 420000\n",
      "current_index: 430000\n",
      "current_index: 440000\n",
      "current_index: 450000\n",
      "current_index: 460000\n",
      "current_index: 470000\n",
      "current_index: 480000\n",
      "current_index: 490000\n",
      "current_index: 500000\n",
      "current_index: 510000\n",
      "current_index: 520000\n",
      "current_index: 530000\n",
      "current_index: 540000\n",
      "current_index: 550000\n",
      "current_index: 560000\n",
      "current_index: 570000\n",
      "current_index: 580000\n",
      "current_index: 590000\n",
      "current_index: 600000\n",
      "current_index: 610000\n",
      "current_index: 620000\n",
      "current_index: 630000\n",
      "current_index: 640000\n",
      "current_index: 650000\n",
      "current_index: 660000\n",
      "current_index: 670000\n",
      "current_index: 680000\n",
      "current_index: 690000\n",
      "current_index: 700000\n",
      "current_index: 710000\n",
      "current_index: 720000\n",
      "current_index: 730000\n",
      "current_index: 740000\n",
      "current_index: 750000\n",
      "current_index: 760000\n",
      "current_index: 770000\n",
      "current_index: 780000\n",
      "current_index: 790000\n",
      "current_index: 800000\n",
      "current_index: 810000\n",
      "current_index: 820000\n",
      "current_index: 830000\n",
      "current_index: 840000\n",
      "current_index: 850000\n",
      "current_index: 860000\n",
      "current_index: 870000\n",
      "current_index: 880000\n",
      "current_index: 890000\n",
      "current_index: 900000\n",
      "current_index: 910000\n",
      "current_index: 920000\n",
      "current_index: 930000\n",
      "current_index: 940000\n",
      "current_index: 950000\n",
      "current_index: 960000\n",
      "current_index: 970000\n",
      "current_index: 980000\n",
      "current_index: 990000\n",
      "current_index: 1000000\n",
      "current_index: 1010000\n",
      "current_index: 1020000\n",
      "current_index: 1030000\n",
      "current_index: 1040000\n",
      "current_index: 1050000\n",
      "0\n"
     ]
    }
   ],
   "source": [
    "\n",
    "sample_feature_columns = ['sample_id', 'click', 'buy', 'md5', 'feature_num', 'feature_list']\n",
    "sample_table = pd.read_table('./ctr_cvr_data/sample_skeleton_test_sample_2_percent.csv', \n",
    "                             sep=',', header=None, names=sample_feature_columns, engine = 'python')\n",
    "#feature_field_list = ['205','206','207','210','216','508','509','702','853','301']\n",
    "feature_name_list = ['ItemID','CategoryID','ShopID','NodeID','BrandID','Com_CateID',\n",
    "                     'Com_ShopID','Com_BrandID','Com_NodeID','PID']\n",
    "field_id_name = {'205':'ItemID',\n",
    "                 '206':'CategoryID',\n",
    "                 '207':'ShopID',\n",
    "                 '210':'NodeID',\n",
    "                 '216':'BrandID',\n",
    "                 '508':'Com_CateID',\n",
    "                 '509':'Com_ShopID',\n",
    "                 '702':'Com_BrandID',\n",
    "                 '853':'Com_NodeID',\n",
    "                 '301':'PID'}\n",
    "entire_fea_dict = {}\n",
    "for k,v in field_id_name.items():\n",
    "    entire_fea_dict[v] = []\n",
    "for index, row in sample_table.iterrows():\n",
    "    feature_arr = row['feature_list'].split('\\001')\n",
    "    fea_dict = {}\n",
    "    for k,v in field_id_name.items():\n",
    "        fea_dict[k] = []\n",
    "    for fea_kv in feature_arr:\n",
    "        fea_field_id = fea_kv.split('\\002')[0]\n",
    "        fea_id_val = fea_kv.split('\\002')[1]\n",
    "        fea_id = fea_id_val.split('\\003')[0]\n",
    "        fea_val = fea_id_val.split('\\003')[1]\n",
    "        #print(fea_field_id,fea_id,fea_val)\n",
    "        fea_dict[fea_field_id].append(fea_id)\n",
    "    #print(fea_dict)\n",
    "    for k,v in fea_dict.items():\n",
    "        if len(v) == 0:\n",
    "            entire_fea_dict[field_id_name[k]].append('<PAD>')\n",
    "        else:\n",
    "            entire_fea_dict[field_id_name[k]].append('|'.join(v))\n",
    "    if index % 10000 == 0:\n",
    "       print(\"current_index:\",index)\n",
    "\n",
    "#print(entire_fea_dict)    \n",
    "\n",
    "entire_fea_table = pd.DataFrame(data=entire_fea_dict,columns=feature_name_list)\n",
    "\n",
    "#print(sample_table.columns)\n",
    "#print(entire_fea_table.columns)\n",
    "sample_table = sample_table.drop('feature_list',axis=1)\n",
    "\n",
    "sample_table = pd.concat([sample_table, entire_fea_table], axis=1, join_axes=[sample_table.index])\n",
    "\n",
    "sample_table.to_csv('./ctr_cvr_data/sampled_sample_skeleton_test_sample_feature_column.csv',index=False)\n",
    "print(0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 处理Common 用户特征\n",
    "### User Features\t\n",
    "101\tUser ID.\n",
    "\n",
    "109_14\tUser historical behaviors of category ID and count*.\n",
    "\n",
    "110_14\tUser historical behaviors of shop ID and count*.\n",
    "\n",
    "127_14\tUser historical behaviors of brand ID and count*.\n",
    "\n",
    "150_14\tUser historical behaviors of intention node ID and count*.\n",
    "\n",
    "121\tCategorical ID of User Profile.\n",
    "\n",
    "122\tCategorical group ID of User Profile.\n",
    "\n",
    "124\tUsers Gender ID.\n",
    "\n",
    "125\tUsers Age ID.\n",
    "\n",
    "126\tUsers Consumption Level Type I.\n",
    "\n",
    "127\tUsers Consumption Level Type II.\n",
    "\n",
    "128\tUsers Occupation: whether or not to work.\n",
    "\n",
    "129\tUsers Geography Informations."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 训练集common feature"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 204,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "current_index: 0\n",
      "current_index: 1000\n",
      "current_index: 2000\n",
      "current_index: 3000\n",
      "current_index: 4000\n",
      "current_index: 5000\n",
      "current_index: 6000\n",
      "current_index: 7000\n",
      "current_index: 8000\n",
      "current_index: 9000\n",
      "current_index: 10000\n",
      "current_index: 11000\n",
      "current_index: 12000\n",
      "current_index: 13000\n",
      "current_index: 14000\n",
      "current_index: 15000\n",
      "current_index: 16000\n",
      "current_index: 17000\n",
      "current_index: 18000\n",
      "(18158, 13)\n",
      "(18158, 3)\n",
      "(18158, 15)\n"
     ]
    }
   ],
   "source": [
    "\n",
    "common_table_columns = ['md5', 'feature_num', 'feature_list']\n",
    "common_table = pd.read_table('./ctr_cvr_data/common_features_skeleton_train_sample_2_percent.csv', \n",
    "                                sep=',', header=None, names=common_table_columns, engine = 'python')\n",
    "feature_name_list = ['UserID', 'User_CateIDs', 'User_ShopIDs', 'User_BrandIDs', 'User_NodeIDs', 'User_Cluster', \n",
    "                     'User_ClusterID', 'User_Gender', 'User_Age', 'User_Level1', 'User_Level2', \n",
    "                     'User_Occupation', 'User_Geo']\n",
    "field_id_name = {'101':'UserID',\n",
    "                 '109_14':'User_CateIDs',\n",
    "                 '110_14':'User_ShopIDs',\n",
    "                 '127_14':'User_BrandIDs',\n",
    "                 '150_14':'User_NodeIDs',\n",
    "                 '121':'User_Cluster',\n",
    "                 '122':'User_ClusterID',\n",
    "                 '124':'User_Gender',\n",
    "                 '125':'User_Age',\n",
    "                 '126':'User_Level1',\n",
    "                 '127':'User_Level2',\n",
    "                 '128':'User_Occupation',\n",
    "                 '129':'User_Geo'}\n",
    "entire_fea_dict = {}\n",
    "for k,v in field_id_name.items():\n",
    "    entire_fea_dict[v] = []\n",
    "for index, row in common_table.iterrows():\n",
    "    feature_arr = row['feature_list'].split('\\001')\n",
    "    fea_dict = {}\n",
    "    for k,v in field_id_name.items():\n",
    "        fea_dict[k] = []\n",
    "    for fea_kv in feature_arr:\n",
    "        fea_field_id = fea_kv.split('\\002')[0]\n",
    "        fea_id_val = fea_kv.split('\\002')[1]\n",
    "        fea_id = fea_id_val.split('\\003')[0]\n",
    "        fea_val = fea_id_val.split('\\003')[1]\n",
    "        #print(fea_field_id,fea_id,fea_val)\n",
    "        fea_dict[fea_field_id].append(fea_id)\n",
    "    #print(fea_dict)\n",
    "    for k,v in fea_dict.items():\n",
    "        if len(v) == 0:\n",
    "            entire_fea_dict[field_id_name[k]].append('<PAD>')\n",
    "        else:\n",
    "            entire_fea_dict[field_id_name[k]].append('|'.join(v))\n",
    "    if index % 1000 == 0:\n",
    "       print(\"current_index:\",index)\n",
    "#print(entire_fea_dict)    \n",
    "\n",
    "entire_fea_table = pd.DataFrame(data=entire_fea_dict, columns=feature_name_list)\n",
    "print(entire_fea_table.shape)\n",
    "print(common_table.shape)\n",
    "common_table = common_table.drop('feature_list',axis=1)\n",
    "\n",
    "common_table = pd.concat([common_table, entire_fea_table], axis=1, join_axes=[common_table.index])\n",
    "\n",
    "common_table.to_csv('./ctr_cvr_data/sampled_common_features_skeleton_train_sample_feature_column.csv',index=False)\n",
    "print(common_table.shape)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 测试集common feature"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 206,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "current_index: 0\n",
      "current_index: 1000\n",
      "current_index: 2000\n",
      "current_index: 3000\n",
      "current_index: 4000\n",
      "current_index: 5000\n",
      "current_index: 6000\n",
      "current_index: 7000\n",
      "current_index: 8000\n",
      "current_index: 9000\n",
      "current_index: 10000\n",
      "current_index: 11000\n",
      "current_index: 12000\n",
      "current_index: 13000\n",
      "current_index: 14000\n",
      "current_index: 15000\n",
      "current_index: 16000\n",
      "current_index: 17000\n",
      "current_index: 18000\n",
      "current_index: 19000\n",
      "current_index: 20000\n",
      "current_index: 21000\n",
      "(21866, 13)\n",
      "0\n"
     ]
    }
   ],
   "source": [
    "\n",
    "common_table_columns = ['md5', 'feature_num', 'feature_list']\n",
    "common_table = pd.read_table('./ctr_cvr_data/common_features_skeleton_test_sample_2_percent.csv', \n",
    "                                sep=',', header=None, names=common_table_columns, engine = 'python')\n",
    "feature_name_list = ['UserID', 'User_CateIDs', 'User_ShopIDs', 'User_BrandIDs', 'User_NodeIDs', 'User_Cluster', \n",
    "                     'User_ClusterID', 'User_Gender', 'User_Age', 'User_Level1', 'User_Level2', \n",
    "                     'User_Occupation', 'User_Geo']\n",
    "field_id_name = {'101':'UserID',\n",
    "                 '109_14':'User_CateIDs',\n",
    "                 '110_14':'User_ShopIDs',\n",
    "                 '127_14':'User_BrandIDs',\n",
    "                 '150_14':'User_NodeIDs',\n",
    "                 '121':'User_Cluster',\n",
    "                 '122':'User_ClusterID',\n",
    "                 '124':'User_Gender',\n",
    "                 '125':'User_Age',\n",
    "                 '126':'User_Level1',\n",
    "                 '127':'User_Level2',\n",
    "                 '128':'User_Occupation',\n",
    "                 '129':'User_Geo'}\n",
    "entire_fea_dict = {}\n",
    "for k,v in field_id_name.items():\n",
    "    entire_fea_dict[v] = []\n",
    "for index, row in common_table.iterrows():\n",
    "    feature_arr = row['feature_list'].split('\\001')\n",
    "    fea_dict = {}\n",
    "    for k,v in field_id_name.items():\n",
    "        fea_dict[k] = []\n",
    "    for fea_kv in feature_arr:\n",
    "        fea_field_id = fea_kv.split('\\002')[0]\n",
    "        fea_id_val = fea_kv.split('\\002')[1]\n",
    "        fea_id = fea_id_val.split('\\003')[0]\n",
    "        fea_val = fea_id_val.split('\\003')[1]\n",
    "        #print(fea_field_id,fea_id,fea_val)\n",
    "        fea_dict[fea_field_id].append(fea_id)\n",
    "    #print(fea_dict)\n",
    "    for k,v in fea_dict.items():\n",
    "        if len(v) == 0:\n",
    "            entire_fea_dict[field_id_name[k]].append('<PAD>')\n",
    "        else:\n",
    "            entire_fea_dict[field_id_name[k]].append('|'.join(v))\n",
    "    if index % 1000 == 0:\n",
    "       print(\"current_index:\",index)\n",
    "#print(entire_fea_dict)    \n",
    "\n",
    "entire_fea_table = pd.DataFrame(data=entire_fea_dict, columns=feature_name_list)\n",
    "print(entire_fea_table.shape)\n",
    "common_table = common_table.drop('feature_list',axis=1)\n",
    "common_table = pd.concat([common_table, entire_fea_table], axis=1, join_axes=[common_table.index])\n",
    "\n",
    "common_table.to_csv('./ctr_cvr_data/sampled_common_features_skeleton_test_sample_feature_column.csv',index=False)\n",
    "print(0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = np.array([1,2])\n",
    "a"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
